import { getToken } from '../auth';
import { upload } from '../../utils/request';

export const uploadFile = async (file: File): Promise<{ fileId: string; url: string; path: string }> => {
  const formData = new FormData();
  formData.append('file', file);

  return upload('/api/admin/files/upload', formData);
};